package com.hw.springcloud;


import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @Classname: PaymentController
 * @Description: zookeeper控制器
 * @Date: 2021/7/6
 * @Author: huwei
 */
@RestController
@Slf4j
public class PaymentController {

    @Value("${server.port}")
    private String serverPort;

    @GetMapping("/linkTest")
    public String linkTest(){
        return "链接正常";
    }

    /**
     * 验证是否注册进zookeeper中
     * @return
     */
    @GetMapping("/payment/zk")
    public String paymentZk(){
        return "springCloud with zookeeper"+serverPort+"UUID:"+UUID.randomUUID().toString();
    }
}
